#include "YetiFleeState.h"

void YetiFleeState::update(YetiEnemy* owner, float framTime)
{
	if(owner->health < 100)
	{
	SteeringOutput steering = flee.getSteering();
	owner->particle.velocity = steering.direction;

	owner->yetiAnims->playAnimation("Move");

	owner->particle.velocity.x *= - steering.direction.x;
	owner->particle.velocity.x = -50.0f * steering.direction.x;

	if(steering.direction.x < 0) { owner->flip = true;  }
	if(steering.direction.x > 0) { owner->flip = false; }
	}
}